enum GuideState {
  START,
  TRACK_UPDATE,
  FAILURE,
  REACHED,
  UNKNOWN;
  // 将字符串转换为NavigationState枚举
  static GuideState fromString(String value) {
    switch (value) {
      case 'STATE_START':
        return GuideState.START;
      case 'STATE_TRACK_UPDATE':
        return GuideState.TRACK_UPDATE;
      case 'STATE_FAILURE':
        return GuideState.FAILURE;
      case 'STATE_REACHED':
        return GuideState.REACHED;
      default:
        return GuideState.UNKNOWN;
    }
  }
}
